const path = require('path')

const axios = require(path.join(__dirname,"api"))

/**
 * 获取首页轮播图数据
 */
exports.getSlides = (req,res) => {
    return axios.get('settings/home_slides').then(res=>res.data).catch(err=>Promise.reject(err))
}

/**
 * 获取首页猜你喜欢数据
 */
exports.getLikes = (req,res) => {
    return axios.get('products?type=like&limit=6').then(res=>res.data).catch(err=>Promise.reject(err))
}